Risk Scripting

The Risk Scripting tool in Enersight allows the user to define scripts that risk specific variables in a project. The Risk Scripting tool can be accessed from the Tools tab on the top menu ribbon.

Click image to expand or minimize. 

Click image to expand or minimize. 

Setting up the Input Script

The Input Script tab allows the user to design a script to run specific sensitivities on their project. Example scripts exist for Tornado, Waterfall and Monte Carlo methodologies.

Click image to expand or minimize. 

Below is a brief description for each of the columns located in the Input Script tab:

Setting Description
Label This designates the name that will appear on all reports and charts generated.
Group Creates groupings to display on the Tornado Chart.
Project Name Leaving this blank will default to the current project. The project must be saved in order to run the calculation.
Scenario Name Leaving this blank will default to the current scenario.
Reset Project If checked, this will reset all risks applied to the current scenario.
Create Results A calculation is performed on the Scenario and Results generated. If unchecked, sensitivities are applied on top of previous sensitivities, i.e., a waterfall analysis.
Asset(s) Risks can be applied to a specific asset or all assets. You can filter which assets have sensitivities applied by user data. Example: [UserDataFieldName]:[Value]|[Value]|[Value] i.e., “Reservoir:a|b”. You may use a * character at the start or end of a value to perform a wildcard search, i.e., Reservoir: a*|*b for reservoirs that starts with an “a” or ends with a “b”.  
Commands The action to be taken. Refer to the Command Reference link at the top of the Risk Scripting table for the full list of commands.
Arg # Includes multipliers for risking, on/off identifiers or data unique to the argument.
Result Assets Will display results for the specific asset that is inputted. By default, leaving this blank will produce results at the scenario level. Multiple assets may be selected with their names being separated by the '|' Character. Auto-added assets must start with ‘Auto’ to disable name validation step i.e. Auto:mywell001|mywell002.
Save to PDS The calculation will be saved to the PDS Name / Version as specified. An additional prefix may optionally be added to all outputs of the run.

Once all of the adjustments are made to the input script, it can be saved for future use by selecting Save next to the script dropdown box.

Example: Designing a Script to Write to PDS

Click image to expand or minimize. 

Run Status

Click image to expand or minimize. 

Outputs

There are a number of different reports that can be generated using the risk scripting tool.

The units of the reporting values correspond to the units that are set in the user options.

Report

The general summary report can be accessed by clicking on the Report tab.

Click image to expand or minimize. 

Time Report

Click image to expand or minimize. 

Time Graph

Click image to expand or minimize. 

Tornado Plot

Click image to expand or minimize. 

Waterfall Plot

Click image to expand or minimize. 

Cum-Prob

The Cum-Prob output is only valid for Monte Carlo simulations.

Click image to expand or minimize. 

Histogram

Click image to expand or minimize.

Risk Script Examples - Using Uploaded Excel Files in Scripts

In Enersight 2.17, three new scripting commands were added: DrillingProgram:WellList, Resources:ReplaceAll, and UserDataTable:Replace. All three of these allow references to Excel files that have been uploaded to the Enersight Documents library to provide a Script Scenario/Risk Script run with a different set of inputs, a different Well List, Resource Definition, or updated User Data Table values. This capability provides more flexibility in the changes that can be made to a model during a script run.

Uploading a Document

These commands rely on an Excel document that has been uploaded into Enersight using the Enterprise > Documents menu entry.

Note that in versions prior to 2.17.1, this was under the Administrator menu and was only accessible by users with Company Admin permissions.

To upload Excel files that can be used in scripts, click Choose File to find your file, give it a name, and choose ScenarioScriptingInputs as the document type. Check the Public to Company Users checkbox if you want all users to be able to access this file. Otherwise only the uploader will be able to see and use it. Click Upload to add a new file to the documents library or click Upload and Replace.

DrillingProgram:WellList Example

To replace a Well List in a script run, use the command DrillingProgram:WellList. This will replace the entire well list with the definition provided in the uploaded Excel file.

Command: DrillingProgram:WellList
Argument 1: Document Name (not the file name, but rather the name in the 'Name' column of the Documents screen).
Argument 2: Drilling Program Name.
Argument 3 (optional): Worksheet name. You can have multiple Well Lists in the same workbook. Defaults to the first sheet in the workbook if there is no input here.

Resources:ReplaceAll Example

To replace the Resource Definitions in a script run, use the command Resources:ReplaceAll. This will replace the entire set of Resources with the definition provided in the uploaded Excel file.

Command: Resources:ReplaceAll
Argument 1: Document Name (not the file name, but rather the name in the 'Name' column of the Documents screen).
Argument 2 (optional): Worksheet name. You can have multiple Resource Definitions in the same workbook. Defaults to the first sheet in the workbook if there is no input here.

UserDataTable:Replace Example

Using the command UserDataTable:Replace, you can update the values in an existing User Data Table. Note that you cannot create new User Data Tables or append new values to an existing table using this command. All values will be replaced with those provided in the uploaded Excel file. Be aware that the Comments column must exist in your Excel file even if it is empty.

Command: UserDataTable:Replace
Argument 1: Document Name (not the file name, but rather the name in the 'Name' column of the Documents screen).
Argument 2: Name of User Data Table.
Argument 3 (optional): Worksheet name. You can have multiple User Data Tables in the same workbook. Defaults to the first sheet in the workbook if there is no input here.